Learn Unity for Android Game Development by Adam Sinicki

Learn Unity for Android Game Development by Adam Sinicki

Author:Adam Sinicki
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


Objective vs. Imperative vs. Functional

Imperative meant that everything you wrote was sequential, and you would write statements in the order that they were to be executed at runtime. The computer would read your code just as you would read an essay: from top to bottom. The only exception was when you used the command GOTO, which would send the interpreter backwards or forwards to a specific line number in the code. This was very straightforward to understand but it also became impossible to manage as programs began to reach millions of lines (which happened a lot). If there was an error in the code, you’d have to scroll through reams and reams of it to find the cause and if you ever wanted to reuse a section, your only option was to copy and paste it.

Then procedural programming came along, which solved some of these issues by containing sections of code in discrete sections called procedures or subroutines. This meant that certain instructions could be called on over and over again and edited separately from the main code—but seeing as you had to call the procedures, the code would still be taking a long winding journey and making countless stops along the way. This is what is referred to now as spaghetti code.

OOP is simply the next evolution from there. It looks at programming less in terms of the commands and more in terms of the data and objects that those commands describe.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.